/*
 SGRecyclableItem.h
 Date Created: March 6, 2010
 
 Authors: Karanvir Gill <viper1029@gmail.com>
          Frank Lau <flaua@sfu.ca>
 
 Copyright (C) 2010 Green-Power
 
 URL: http://code.google.com/p/green-power
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 $Id$
 */

#import <Foundation/Foundation.h>
#import "SGRecyclableType.h"

/**
 * This class represents a recyclable item used in the sorting game. Each 
 * recyclable item is of a specific recyclable type.
 */
@interface SGRecyclableItem : UIImageView  {
	CGPoint startLocation;
	BOOL isBeingDragged;
	BOOL hasBeenDropped;
	BOOL isLifeGiver;
	NSUInteger depositValue;
	NSString* uniqueName;
}

@property (nonatomic,readonly) BOOL isBeingDragged;
@property (nonatomic,readonly) BOOL hasBeenDropped;
@property (nonatomic,readonly) BOOL isLifeGiver;
@property (nonatomic) NSUInteger depositValue;
@property (nonatomic,retain) NSString*  uniqueName;

/**
 * Constructor used to initilize a recyclable item based on the based 
 * on the item type and x and y coordinates. 
 *
 * \param itemType The type of item to create
 *
 * \param xLocation The x coordinate of the center of the item when it's created
 *
 * \param yLocation The y coordinate of the center of the item when it's created
 *
 * \param givesLife If true, the item will give a bonus life when dropped in correct bin
 * \return The item with all of its arrtibutes including position, image, 
 * deposit value and unique name 
 */
- (SGRecyclableItem*)initWithType:(SGRecyclableType*)itemType xLocation:(float)xCoor yLocation:(float)yCoor givesLife:(BOOL)lifeGiver;

/**
 * Combines two images and return one image. The size of the background is 
 * set to 100 by 100. Size of the foreground image will not be changed.
 *
 * \param image1 The image that will be in the foreground
 *
 * \param image2 The image that will be in the background
 *
 * \return Returns the combined images
 */
- (UIImage*) combineImage:(UIImage*)image1 toBackground:(UIImage*)image2;


@end
